const Koa = require('koa')
const axios = require('axios')
const parser = require('koa-bodyparser')
const app = new Koa()
const InitManager = require('./core/init')
const catchError = require('./middlewares/exception')
// const classic = require('./api/v1/classic')
// const book = require('./api/v1/book')
//根据数据类型不同划分主题
//上层调用下层而不是下层调用上层
app.use(catchError)
app.use(parser())
InitManager.initCore(app)
// app.use(book.routes())  
// app.use(classic.routes())

app.listen(3000)